﻿@model MvcMusicStore.Song

@{
    ViewBag.Title = "Song";
}



<a href ="@Url.Action("Details", "Store", new { id = @Model.Album.id })">
            <img   height= "50" width ="50" alt="@Model.Album.titleAlbum" src="@Model.Album.coverAlbum" /></a>
           @* <p style="{font-size:10px; text-align:center}">@Model.Album.titleAlbum</p>*@
           @* @Html.ActionLink(Model.titleSong, "Song", new { id = Model.id })*@
 <p><h2>Song: @Model.titleSong

<span >
    <embed type="application/x-shockwave-flash" src="/Player/Simple.swf" flashvars="foreColor=#0088CC&amp;analytics=false&amp;filename=/Store/Download/@(Model.id)"
        quality="high" wmode="transparent" width="18" height="18" bgcolor="#FFFFFF"/>
</span></h2>
 </p>
        <p><em>Price:</em>
        @String.Format("{0:F}", Model.costSong) $</p>
    
    @if (Model.aspnet_Users.Any(a => a.UserName == User.Identity.Name)
        || Model.Album.aspnet_Users.Any(a => a.UserName == User.Identity.Name))
    {
        <strong class="button">Already bought</strong>
    }
    else
    {
        <p class="button">
        @Html.ActionLink("Buy it now!", "PurchaseSong", "Cart", new { id = Model.id }, "")

    </p>
    }

    
  
